const USER_INFO_KEY = "info";

function getToken(): string | null {
    return localStorage.getItem(USER_INFO_KEY);
}

function setToken(infoToken?: string) {
    if (infoToken)
        localStorage.setItem(USER_INFO_KEY, infoToken);
}

function clearToken() {
    return localStorage.removeItem(USER_INFO_KEY);
}

export {USER_INFO_KEY, getToken, setToken, clearToken};
